package dk.dashboardFP.contextPanel {
	import flash.display.Sprite;

	/**
	 * @author josef
	 */
	public class ContextPanelHandler {
		private var _sprContextPanelHolder : Sprite;
		
		public function ContextPanelHandler(sprContextPanelHolder:Sprite) {
			_sprContextPanelHolder = sprContextPanelHolder;
		}

		public function addContextPanel(doContextPanel:AbstractContextPanel) : void {
			_sprContextPanelHolder.addChild(doContextPanel);
		}

		public function removeContextPanel(doContextPanel : AbstractContextPanel) : void {
			if (_sprContextPanelHolder.contains(doContextPanel)) {
				_sprContextPanelHolder.removeChild(doContextPanel);
			}
		}
	}
}
